# include <stdio.h>
int main()
{
	int a,n,i,b;
	long s;
	scanf("%d%d",&a,&n);
	for(b=0,i=1,s=0;i<=n;i++)
	{
		b=b*10+a;
		s=s+b;
	}
	printf("%ld",s);
	return 0 ;
}
